package com.jiu345.api.controller;

import com.jiu345.api.pojo.Banner;
import com.jiu345.api.service.IBannerService;
import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.common.web.core.BaseController;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * package:GoodsCateController
 * @author MrLei QQ:235921049
 * @date 2024-05-21
 * desc:商品分类
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/goods/banner")
public class BannerController extends BaseController {
    private final IBannerService bannerService;


    /*轮播图*/
    @GetMapping("/list")
    public R<List<Banner>> list(Banner bo){
        List<Banner> list = bannerService.queryList(bo);
        return R.ok(list);
    }

}
